package com.pandora.loan.home.enums;

/**
 * @author developer
 */
public enum ReportTypeEnum {
    /**
     * OP
     */
    OP("OP", 0),
    /**
     * TR
     */
    TR("TR", 1),
    /**
     * EC
     */
    EC("EC", 2),
    /**
     * ED
     */
    ED("EC", 3),
    /**
     * WM
     */
    WM("WM", 4),
    /**
     * HF
     */
    HF("HF", 5),
    /**
     * DR
     */
    DR("DR", 6),
    /**
     * BF
     */
    BF("BF", 7),
    /**
     * C4
     */
    C4("C4", 8);

    private String key;
    private int value;

    private ReportTypeEnum(String key, int value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public int getValue() {
        return value;
    }

    public static ReportTypeEnum getReportType(String key) {
        for (ReportTypeEnum reportType : values()) {
            if (key.equals(reportType.getKey())) {
                return reportType;
            }
        }
        return null;
    }
}
